package com.software.graduationproject.modules.shopping.object;

import com.software.graduationproject.modules.food.entity.Food;
import com.software.graduationproject.modules.shopping.entity.ShoppingCart;
import com.v2coding.validate.CreateGroup;
import com.v2coding.validate.UpdateGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * ShoppingCartVo : 购物车表
 * ---------------------------------------------------------------------------------------------------------------------
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class ShoppingCartVo extends ShoppingCart {

    @ApiModelProperty(value = "商家名称")
    private String marketersName;

    @ApiModelProperty(value = "商家图")
    private String marketersImg;

    @ApiModelProperty(value = "食品集合")
    private List<Foods> foodList;

    @ApiModelProperty(value = "食品名称")
    private String foodName;

    @ApiModelProperty(value = "食品图")
    private String foodImg;

    @ApiModelProperty(value = "配送费")
    private Double deliveryFee;

    @Data
    public static class Foods {

        @ApiModelProperty(value = "Id")
        private Long Id;

        @ApiModelProperty(value = "foodId")
        private Long foodId;

        @ApiModelProperty(value = "食品名称")
        private String foodName;

        @ApiModelProperty(value = "食品图")
        private String foodImg;

        @ApiModelProperty(value = "总数")
        private Integer quantity;

        @ApiModelProperty(value = "总价")
        private Double price;

        @ApiModelProperty(value = "原总价")
        private Double originalPrice;

        @ApiModelProperty(value = "单价")
        private Double unitPrice;

        @ApiModelProperty(value = "折扣")
        private Float discount;

        @ApiModelProperty(value = "口味")
        private String taste;

        @ApiModelProperty(value = "评价状态")
        private Long status;
    }
}
